package com.ids.idtma.setting;

import com.ids.idtma.ActivityBase;
import com.ids.idtma.IdtApplication;
import com.ids.idtma.R;
import com.ids.idtma.map.IdtMap;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.TextView;

public class TongDaoSettingActivity extends ActivityBase implements OnClickListener {
	private Intent intent;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_tong_dao_setting);
		IdtApplication.getInstance().addActivity(this);
		intent = getIntent();
		String code = intent.getStringExtra("SIGPORT");
		String width = intent.getStringExtra("MEDPORT");
		String height = intent.getStringExtra("SUBS_NUM");
		String bitrate = intent.getStringExtra("SUBS_LEVEL");

		TextView video_code = (TextView) findViewById(R.id.SIGPORT);
		TextView video_width = (TextView) findViewById(R.id.MEDPORT);
		TextView video_height = (TextView) findViewById(R.id.SUBS_NUM);
		TextView video_bitrate = (TextView) findViewById(R.id.SUBS_LEVEL);
		((TextView) findViewById(R.id.page_title_name)).setText("通道保活时间");
		video_code.setText(code);
		video_width.setText(width);
		video_height.setText(height);
		video_bitrate.setText(bitrate);
	}

	@Override
	public void onClick(View v) {
		Intent intent = new Intent();
		switch (v.getId()) {
		case R.id.return_button:// 返回按钮
			IdtApplication.getInstance().deleteActivity(this);
			break;
		case R.id.map:
			// 点击地图图标
			intent.setClass(TongDaoSettingActivity.this, IdtMap.class);
			intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
			startActivity(intent);
			break;

		}
	}

}
